package com.zixun.repository;

import com.zixun.model.Industry;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;


public interface IndustryRepository extends JpaRepository<Industry,Integer>{

    @Query("select i from Industry i where i.parentId = :id")
    List<Industry> findAllByParentId(@Param("id") Integer id);

}
